﻿using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ST.Torch.WebApi.Core.Entities.DaTi
{
    public class D_Gift : BaseEntity, IEntityTypeBuilder<D_Gift>
    {
        /// <summary>
        /// 礼品名称
        /// </summary>
        [MaxLength(500)]
        public string Name { get; set; }
        /// <summary>
        /// 礼品图片
        /// </summary>
        [MaxLength(500)]
        public string GiftImgUrl { get; set; }
        /// <summary>
        /// 礼品数量
        /// </summary>
        [MaxLength(500)]
        public int Number { get; set; }

        /// <summary>
        /// 剩余数量
        /// </summary>
        [MaxLength(500)]
        public int RemainingNumber { get; set; }
        public void Configure(EntityTypeBuilder<D_Gift> entityBuilder, DbContext dbContext, Type dbContextLocator)
        {
            entityBuilder.HasKey(u => u.Id);

            //throw new NotImplementedException();
        }
    }
}
